@mixin fillColor($background, $color) {
  border: 2px solid $background;
  background-color: $background;
  color: $color;
  box-shadow: 0 0 10px -5px rgba(#000, 0.4);
  &:hover {
    border: 2px solid darken($background, 5);
    background-color: darken($background, 5);
    box-shadow: 0 0 15px -5px rgba(#000, 0.4);
  }
}

.toast {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 10px;
  margin: 5px 0;
  padding: 10px;
  border-radius: 0px;
  width: 350px;
  user-select: none;
  box-shadow: 0 0 10px -5px rgba(#000, 0.4);
  z-index: 9999;
  @include fillColor(#f0f0f0, #000);
  opacity: 1;
  &.toast-success {
    @include fillColor(#51a351, #fff);
  }
  &.toast-info {
    @include fillColor(#2f96b4, #fff);
  }
  &.toast-warning {
    @include fillColor(#f89406, #fff);
  }
  &.toast-error {
    @include fillColor(#bd362f, #fff);
  }
  .toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    .icon {
      font-size: 36px;
    }
  }
  .toast-content {
    position: relative;
    .toast-close-button {
      position: absolute;
      top: 0;
      right: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0;
      padding: 0px 5px 0 0;
      width: 25px;
      height: 25px;
      border: none;
      border-radius: 50%;
      background: transparent;
      color: inherit;
      &:focus {
        outline: none;
      }
    }
    .toast-title {
      margin: 0;
      padding: 0;
      font-size: 1rem;
      font-weight: 600;
    }
    .toast-message {
      margin: 0;
      padding: 0;
    }
  }
}
